<html>
<head><meta charset="utf-8"><title>Semantics of raw pointer comparisons · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html">Semantics of raw pointer comparisons</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216562574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216562574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick12 <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216562574">(Nov 13 2020 at 03:24)</a>:</h4>
<p>What are the semantics of raw pointer comparisons? They implement both Ord and PartialOrd, I searched around a bit for their behaviour but could not find anything</p>
<p>I assume comparisons are never UB since they're safe, but how well behaved is it? Does it care about provenance at all? Is there ever a difference compared to casting to usize and then performing the comparison?</p>
<p>In case this is indeed not documented anywhere, it probably should be (Would this warrant opening an issue in the <br>
unsafe-code-guidelines repo?)</p>



<a name="216565360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216565360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216565360">(Nov 13 2020 at 04:17)</a>:</h4>
<p>did you look in the Rustonomicon?</p>



<a name="216565513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216565513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216565513">(Nov 13 2020 at 04:20)</a>:</h4>
<p>otherwise the UCG GitHub does seem like a good place to get further analysis</p>



<a name="216568743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216568743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216568743">(Nov 13 2020 at 05:19)</a>:</h4>
<p>it's not semantically defined but Raw Pointer Comparions are<br>
described here: <br>
<a href="https://doc.rust-lang.org/nightly/reference/types/pointer.html">https://doc.rust-lang.org/nightly/reference/types/pointer.html</a></p>



<a name="216729586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216729586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216729586">(Nov 14 2020 at 13:39)</a>:</h4>
<p>Unfortunately this is a really, really hard questions and IMO these should not be safe operations^^</p>



<a name="216729614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216729614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216729614">(Nov 14 2020 at 13:39)</a>:</h4>
<p><span class="user-mention" data-user-id="219940">@Nick12</span>  the <em>desired</em> semantics is that it is equivalent to first casting to integer and then doing the same comparison there. IOW, provenance is ignored. the open question is if LLVM is actually able to guarantee that semantics. (I think they want to, but doing so might be tricky due to some of the optimizations they perform.)</p>



<a name="216746195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216746195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick12 <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216746195">(Nov 14 2020 at 19:43)</a>:</h4>
<p>Thanks! My question came up when skimming Peter's <a href="http://vsb.rs">vsb.rs</a>, specifically comparisons like <a href="https://github.com/retep998/wio-rs/blob/master/src/vsb.rs#L120">https://github.com/retep998/wio-rs/blob/master/src/vsb.rs#L120</a> and <a href="https://github.com/retep998/wio-rs/blob/master/src/vsb.rs#L123">https://github.com/retep998/wio-rs/blob/master/src/vsb.rs#L123</a> since it's between pointers with potentially different provenance</p>
<p>So, if this were a problem, it would be a bug in rustc which would either be fixed by changing the way these are translated into llvm ops or changing something in llvm? By which I mean, code should be written according to the "desired" semantics that you mentioned</p>
<p>cc <span class="user-mention" data-user-id="125267">@Peter Rabbit</span></p>



<a name="216746508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216746508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216746508">(Nov 14 2020 at 19:48)</a>:</h4>
<p>We could change rustc to lower them to LLVM as first casting to integers, and then comparing. If that ever makes a difference for LLVM, I think that's what we should do, and I hope that it will be enough -- I can imagine such scenarios where this is not enough but they seem exceeding unlikely, and at some point being defensive just doesn't pay off any more (as much as I'd like to be defensive), in particular when there simply is no alternative.</p>



<a name="216746539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216746539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216746539">(Nov 14 2020 at 19:49)</a>:</h4>
<p>so for cases where ptr comparisons are truly needed, I think there is little point to being defensive when writing Rust code -- I'd recommend working with the "desired semantics".</p>



<a name="216817325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216817325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216817325">(Nov 15 2020 at 22:09)</a>:</h4>
<blockquote>
<p>the <em>desired</em> semantics is that it is equivalent to first casting to integer and then doing the same comparison there. IOW, provenance is ignored. the open question is if LLVM is actually able to guarantee that semantics. (I think they want to, but doing so might be tricky due to some of the optimizations they perform.)</p>
</blockquote>
<p>I know clang has a way to do it, to implement <code>std::less</code> in the C++ standard library. I could look into what that way is, which may be cast to integer, then compare.</p>



<a name="216817596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216817596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216817596">(Nov 15 2020 at 22:17)</a>:</h4>
<p>So looking at <code>libc++</code>, it seems that it just does a raw comparison and nothing fancy for <code>T*</code>. I think it's safe to then assume that llvm is ok with comparing arbitrary pointers, as it seems pointless to ignore an optimization that the standard permits, only to have it be the default to allowing the same optimization at the ir level.</p>



<a name="216849624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216849624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216849624">(Nov 16 2020 at 09:40)</a>:</h4>
<p>IIRC, C++ says that comparing pointers sometimes can yield "indeterminate" results -- which is not acceptable for Rust, as this implies the operation is unsafe. "indeterminate value" is <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_260.htm">C/C++ speak for something like LLVM <code>undef</code></a> -- at least according to committee consensus (I don't think the spec is precise enough that one could deduce this, unfortunately). So I don't think we can learn much by studying what clang's C++ implementation does.<br>
C does not allow the result to be indeterminate, but in cases where C++ has more UB than C, clang is <a href="https://bugs.llvm.org/show_bug.cgi?id=965">known to sometimes apply</a> C++ UB even in C (which is incorrect), so I would also be careful interpreting clang's C implementation.<br>
Really the only thing we can go off of is LLVM's LangRef, which is not precise enough to answer this question.</p>



<a name="216934187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216934187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tavian Barnes <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216934187">(Nov 16 2020 at 21:23)</a>:</h4>
<p>C++ says that about the comparison operators, yes, but std::less on pointers is supposed to give a strict total order on pointers (e.g. by casting them to uintptr_t before comparison).  If libc++ implements std::less as <code>a &lt; b</code> then you could argue that LLVM must make additional guarantees about <code>a &lt; b</code> to make that work.  But really it's probably just a bug in libc++: <a href="https://quuxplusone.github.io/blog/2019/01/20/std-less-nightmare/">https://quuxplusone.github.io/blog/2019/01/20/std-less-nightmare/</a></p>



<a name="216947878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/216947878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Connor Horman <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#216947878">(Nov 16 2020 at 23:32)</a>:</h4>
<blockquote>
<p>IIRC, C++ says that comparing pointers sometimes can yield "indeterminate" results -- which is not acceptable for Rust, as this implies the operation is unsafe. "indeterminate value" is <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_260.htm">C/C++ speak for something like LLVM <code>undef</code></a> -- at least according to committee consensus (I don't think the spec is precise enough that one could deduce this, unfortunately). So I don't think we can learn much by studying what clang's C++ implementation does.<br>
C does not allow the result to be indeterminate, but in cases where C++ has more UB than C, clang is <a href="https://bugs.llvm.org/show_bug.cgi?id=965">known to sometimes apply</a> C++ UB even in C (which is incorrect), so I would also be careful interpreting clang's C implementation.<br>
Really the only thing we can go off of is LLVM's LangRef, which is not precise enough to answer this question.</p>
</blockquote>
<p>AFAIK it's unspecified. Particularly, <code>a&lt;b</code> is unspecified and <code>b&lt;a</code> is unspecified (also as is <code>a&lt;=&gt;b</code> and <code>b&lt;=&gt;a</code>).<br>
Even if it was indeterminate though, I think we can infer that, as an extension, clang defines it to result in an unspecified value that forms a consistent total order. Either way, this seems to imply it is (somehow) possible with llvm. </p>
<blockquote>
<p>C++ says that about the comparison operators, yes, but std::less on pointers is supposed to give a strict total order on pointers (e.g. by casting them to uintptr_t before comparison).  If libc++ implements std::less as <code>a &lt; b</code> then you could argue that LLVM must make additional guarantees about <code>a &lt; b</code> to make that work.  But really it's probably just a bug in libc++: <a href="https://quuxplusone.github.io/blog/2019/01/20/std-less-nightmare/">https://quuxplusone.github.io/blog/2019/01/20/std-less-nightmare/</a></p>
</blockquote>
<p>That was an interesting read. What I would presume is that clang and libc++ looked at the heckery that is libstdc++, said "nope", and implemented pointer comparisons as a total order.</p>



<a name="217031613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217031613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tavian Barnes <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217031613">(Nov 17 2020 at 17:04)</a>:</h4>
<blockquote>
<p>C does not allow the result to be indeterminate</p>
</blockquote>
<p>C is more restrictive than C++ here actually.  Doing <code>a &lt; b</code> on unrelated pointers invokes undefined behaviour: <a href="https://en.cppreference.com/w/c/language/operator_comparison">https://en.cppreference.com/w/c/language/operator_comparison</a>.  This is in contrast to C++ which makes it an unspecified result: <a href="https://en.cppreference.com/w/cpp/language/operator_comparison">https://en.cppreference.com/w/cpp/language/operator_comparison</a>.</p>
<blockquote>
<p>I think we can infer that, as an extension, clang defines it to result in an unspecified value that forms a consistent total order.</p>
</blockquote>
<p>This is probably true, but it would be nice to have some documentation or statement that confirms this.</p>



<a name="217084666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217084666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mario Carneiro <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217084666">(Nov 18 2020 at 01:05)</a>:</h4>
<p>But in C you can still do <code>(uintptr_t)a &lt; (uintptr_t)b</code>, though, right? I can't imagine how else you could implement pointer-keyed hash tables and binary trees otherwise</p>



<a name="217304634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217304634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217304634">(Nov 19 2020 at 17:40)</a>:</h4>
<p>to clarify: AFAIK in C++, when you do <code>==</code> on a one-past-the-end-ptr of one object and the first ptr of an object immediately adjacent in memory, the result is indeterminate. in C, the result must match the underlying physical address equality. so this is an example where C is more strictly defined than C++.<br>
based on what <span class="user-mention" data-user-id="306504">@Tavian Barnes</span> says, there are other examples where C++ is more strictly defined.</p>



<a name="217304788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217304788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217304788">(Nov 19 2020 at 17:41)</a>:</h4>
<p>but I hope none of this matters for Rust -- and in fact we <em>have to</em> define them fairly strictly because they are safe. even "implementation-defined" would be rather unsatisfying.</p>



<a name="217304828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217304828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217304828">(Nov 19 2020 at 17:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="271719">Mario Carneiro</span> <a href="#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons/near/217084666">said</a>:</p>
<blockquote>
<p>But in C you can still do <code>(uintptr_t)a &lt; (uintptr_t)b</code>, though, right? I can't imagine how else you could implement pointer-keyed hash tables and binary trees otherwise</p>
</blockquote>
<p>yiu can implement them like anything else in C -- cause UB and hope the compiler won't exploit that ;)</p>



<a name="217305301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/217305301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#217305301">(Nov 19 2020 at 17:45)</a>:</h4>
<blockquote>
<p>If libc++ implements std::less as a &lt; b then you could argue that LLVM must make additional guarantees about a &lt; b to make that work</p>
</blockquote>
<p>That sounds reasonable. this is also, to my knowledge, the intention in LLVM: comparison operators ignore provenance. what is unclear if this is correctly implemented.</p>



<a name="219216658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/219216658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tavian Barnes <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#219216658">(Dec 08 2020 at 15:03)</a>:</h4>
<p>Yes, that's fine.  Technically I don't think the standard requires <code>(uintptr_t)a &lt; (uintptr_t)b</code> to agree with the pointer comparison <code>a &lt; b</code>, but practically most implementations define the pointer-&gt;int conversion to make it so.  But compilers have bugs that will sometimes ignore the integer casts, e.g. <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330</a>.  I think LLVM has the same bug but I forget the number.</p>



<a name="219772634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/219772634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#219772634">(Dec 13 2020 at 18:13)</a>:</h4>
<p><span class="user-mention" data-user-id="306504">@Tavian Barnes</span> this one? <a href="https://bugs.llvm.org/show_bug.cgi?id=34548">https://bugs.llvm.org/show_bug.cgi?id=34548</a></p>



<a name="219848909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics%20of%20raw%20pointer%20comparisons/near/219848909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tavian Barnes <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/Semantics.20of.20raw.20pointer.20comparisons.html#219848909">(Dec 14 2020 at 14:34)</a>:</h4>
<p>I think so yeah</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>